package com.tjetc.mapper;

import com.tjetc.domain.Vehicle;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface VehicleMapper {
    int deleteByPrimaryKey(Integer vehicleId);

    int insert(Vehicle record);

    Vehicle selectByPrimaryKey(Integer vehicleId);

    int updateByPrimaryKey(Vehicle record);

    @Select("select * from vehicle")
    List<Vehicle> list();

    int update(Vehicle vehicle);

    List<Vehicle> listBySome(@Param("model") String model,@Param("min") double min,@Param("max") double max);

    @Select("select * from vehicle where license_plate=#{licensePlate}")
    Vehicle selectByLincensePlate(String licensePlate);
}